package com.sm.utils;

import com.sm.entity.AttendanceTotal;

public class WorkTimeUtil {

    static public double calculateWages(AttendanceTotal attendanceTotal){
        double baseSalary = attendanceTotal.getUserInfo().getBaseSalary();
        System.out.println(attendanceTotal);
        double worktime = attendanceTotal.getWorktime()/60;
        double overtimea = attendanceTotal.getOvertimea()/60;
        double overtimeb = attendanceTotal.getOvertimeb()/60;
        double overtimec = attendanceTotal.getOvertimec()/60;
        double wages = (baseSalary/21)*(worktime/8)+worktime/21/8*1.5*overtimea+worktime/21/8*2*overtimeb;
        return wages;
    }

    static public double personalTax(double wages){
        double wagesReal = wages;
        return wagesReal;
    }

}
